package uk.ac.salfordcc.sccmobile;

import android.app.ActionBar;
import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.text.Html;
import android.text.method.LinkMovementMethod;
import android.util.Log;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.TextView;

/**
 * Created by bwarrington on 05/08/13.
 */
public class ViewNewsActivity extends Activity {
    String HTML, TITLE;
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_view_news);

        Intent intent = getIntent();
        try{
            HTML = intent.getStringExtra("HTML");
            TITLE = intent.getStringExtra("TITLE");
        }
        catch(Exception exc){
            Log.e("scc view news load: ", exc.getMessage().toString());
        }

        TextView body = (TextView)findViewById(R.id.newsBody);
        TextView head = (TextView)findViewById(R.id.newsHead);

        body.setText(Html.fromHtml(HTML));
        head.setText(TITLE);

        ActionBar bar = getActionBar();
        bar.hide();
    }
}